//
//  AXFCategaryCellTableViewCell.m
//  aixinfeng005
//
//  Created by apple on 2016/10/11.
//  Copyright © 2016年 BBSWaitting. All rights reserved.
//

#import "AXFCategaryCellTableViewCell.h"
#import "UILabel+Addition.h"

@interface AXFCategaryCellTableViewCell ()

@property(nonatomic,weak)UILabel * nameLabel;

@end

@implementation AXFCategaryCellTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectedBackgroundView.backgroundColor = [UIColor clearColor];

        [self setupUI];
        
    }
    return self;
}

#pragma mark -- 搭建界面
- (void)setupUI

{
    self.contentView.backgroundColor = [UIColor colorWithRed:236.0 / 255 green:236.0 / 255 blue:236.0 / 255 alpha:1];
   UILabel *nameLabel = [UILabel makeLabelText:@"天天特价" andTextColor:[UIColor blueColor] andTextFont:14];
    
    [self.contentView addSubview:nameLabel];
    
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(10);
        make.centerX.equalTo(self.contentView);
        
    }];
    
    self.nameLabel = nameLabel;
    
    UIView *yellowView = [[UIView alloc] init];
    
    yellowView.backgroundColor = [UIColor yellowColor];
    
    yellowView.frame = CGRectMake(0, 5, 4, 34);
    
    self.selectedBackgroundView.backgroundColor = [UIColor clearColor];
    
    [self.selectedBackgroundView addSubview:yellowView];
    
}
-(void)setName:(NSString *)name
{
    _name = name;
    
    self.nameLabel.text = name;
}

@end
